<script setup lang="ts">
//
import { ref } from 'vue'
import { loadWeatherGet } from '@/services/home'
import { onLoad } from '@dcloudio/uni-app'

defineProps({
  weatherData: String,
})
</script>

<template>
  <view class="index-weather">
    <image
      class="background-image"
      src="@/static/images/weatherBackColor.jpg"
      mode="aspectFill"
    ></image>
    <view class="content">
      <view class="item">{{ weatherData }}</view>
    </view>
  </view>
</template>

<style lang="scss">
.index-weather {
  width: 690rpx;
  height: 100rpx;
  position: relative;
  margin: 0 auto;
  border-radius: 80rpx;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.content {
  z-index: 1;
  display: flex;
  align-items: center;
}

.item {
  font-size: 36rpx;
  display: inline-flex; /* 内联元素使其在同一行显示 */
  align-items: center;
  margin-right: 20rpx; /* 调整项之间的间距 */
}
</style>
